﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Admin.Master" AutoEventWireup="true" CodeBehind="Edit.aspx.cs" Inherits="Cn.Cellula.Website.Admin.Content.UploadFile.Edit" Title="编辑上传文件" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript" src="/Cellula_client/Controls/JskitFileUpload.js"></script>
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/Controls/JskitFileUpload.css" />
    <script type="text/javascript" src="/Cellula_client/ImagePreview/CJL.0.1.min.js"></script>
    <script type="text/javascript" src="/Cellula_client/ImagePreview/ImagePreview.js"></script>
    <script type="text/javascript">
        var ip = null;
        function PageOnLoad(){
            var ip = new ImagePreview( $$(fixId("file_uploador")), $$("img_Preview"), {
	            maxWidth: 400, maxHeight: 300, action: "ImagePreview.ashx"
            });
            ip.img.src = ImagePreview.TRANSPARENT;
            ip.file.onchange = function(){ ip.preview(); };
            
            var oldUrl = $("#"+fixId("hid_OldPicUrl")).value;
            if(oldUrl!=""){
                $("#img_Preview").src = oldUrl;
            }
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_PageTitle" runat="server">
编辑上传文件
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_MainBody" runat="server">
    <asp:HiddenField runat="server" ID="hid_OldPicUrl" />
    <fieldset>
        <legend>文档信息</legend>
        <table border="0" cellpadding="0" cellspacing="0" class="edit_form">
            <tr>
                <td class="edit_form_item_title">
                    <span class="required">文档名：</span>
                </td>
                <td class="edit_form_item_content">
                    <asp:TextBox runat="server" ID="txt_SrcName" Width="400px"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td class="edit_form_item_title">
                    <span class="required">选择文件：</span>
                </td>
                <td class="edit_form_item_content">
                    <input type="file" runat="server" id="file_uploador" style="width:400px;" />
                </td>
            </tr>
        </table>
    </fieldset>
    <div class="action_bar">
        <asp:Button ID="btn_save" runat="server" Text="保存" OnClick="btn_save_Click" />
        <input type="reset" value="重置" />
        <input type="button" onclick="jskitBulter.redirect('Admin/Content/UploadFile/List.aspx')" value="取消" />
    </div>
    <div><img id="img_Preview" alt="" src="" style="border-width:0px;" />
    </div>
</asp:Content>
